<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  ~ Copyright (c) 2019 Contributors to the Eclipse Foundation
  ~
  ~ See the NOTICE file(s) distributed with this work for additional
  ~ information regarding copyright ownership.
  ~
  ~ This program and the accompanying materials are made available under the
  ~ terms of the Eclipse Public License 2.0 which is available at
  ~ http://www.eclipse.org/legal/epl-2.0, or the Apache Software License 2.0
  ~ which is available at https://www.apache.org/licenses/LICENSE-2.0.
  ~
  ~ SPDX-License-Identifier: EPL-2.0 OR Apache-2.0
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->

<div id="EnricherView" *ngIf="availableFeatures">
    <div class="enrichmentContainer">
        <a class="title">Management Feature Enrichment</a>
        <winery-loader *ngIf="loading">
        </winery-loader>
        <accordion>
            <accordion-group class="innerContainer" [isOpen]="i === 0"
                             heading="{{availableFeatures[i].nodeTemplateId}}"
                             panelClass="panel-info"
                             (mouseover)="onHoverOver(entry)"
                             (mouseleave)="hoverOut()"
                             *ngFor="let entry of availableFeatures; let i = index;">
                Available Enrichments:
                <div *ngFor="let feature of entry.features">
                    <input type="checkbox" (change)="featureSelectionChanged(feature, entry, $event)">
                    {{feature.featureName}}
                </div>
            </accordion-group>
        </accordion>
    </div>
    <div class="innerContainer">
        <button type="button" class="btn btn-sm btn-primary"
                [disabled]="toApply.length===0"
                (click)="applyEnrichment()">Apply
        </button>
        <button type="button" class="btn btn-sm btn-danger"
                (click)="cancel()">
            Cancel
        </button>
    </div>
</div>
